-- GENERATED SPELL FOR [Coilskar General] --


function spell0_22873(pUnit, Event) --@Booming Voice,Self--
pUnit:FullCastSpellOnTarget(40080,pUnit)
pUnit:RegisterEvent('Sorts_22873', 30278, 1)
end

function spell1_22873(pUnit, Event) --@Free Friend,n/a--
pUnit:FullCastSpellOnTarget(40081,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22873', 5314, 1)
end

function Sorts_22873(pUnit, Event)
local choix_sorts_22873 = math.random(0, 1)
if choix_sorts_22873 == 0 then
pUnit:RegisterEvent('spell0_22873', 1, 1)
end
if choix_sorts_22873 == 1 then
pUnit:RegisterEvent('spell1_22873', 1, 1)
end
end

function mob22873_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22873', math.random(1500, 3000), 1)
end

function mob22873_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22873_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22873_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22873, 1, 'mob22873_Action')
RegisterUnitEvent(22873, 2, 'mob22873_Leave')
RegisterUnitEvent(22873, 3, 'mob22873_Kill')
RegisterUnitEvent(22873, 4, 'mob22873_Die')
